package com.lxh.bridge;

/**
 * 桥接模式
 * 增加公司 不修改原来的类
 * 增加产品
 * Create by lxh on 2020/2/13
 */
public class Main {
    public static void main(String[] args) {
        House house = new House();

        HouseCorp houseCorp = new HouseCorp(house);
        houseCorp.makeMoney();

        ShanZhaiCorp shanZhaiCorp = new ShanZhaiCorp(new Ipad());
        shanZhaiCorp.makeMoney();

        houseCorp = new HouseCorp(new BusinessHouse());
        houseCorp.makeMoney();
    }
}
